package com.demo.domain.vo;

import com.demo.domain.Reply;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class CommentView {
    private Long id;
    private String unickname;
    private String content;
    private int likes;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime releaseTime;
    private List<ReplyView> replyList;

    private boolean userLikeFlag;

    public CommentView(Long id, String unickname, String content, int likes, LocalDateTime releaseTime) {
        this.id = id;
        this.unickname = unickname;
        this.content = content;
        this.likes = likes;
        this.releaseTime = releaseTime;
    }

    public CommentView() {
    }
}
